//
//  CustomFunction.h
//  GKeyboard
//
//  Created by Seven on 2018/12/12.
//  Copyright © 2018 Seven. All rights reserved.
//

#import <Foundation/Foundation.h>
//计算block执行时间
CGFloat custom_time_block_log(NSString *logMsg, void (^block)(void));
CGFloat custom_time_block (void (^block)(void));

//延迟执行.
void custom_dispatch_after_log(NSString* logMsg, float delayTime, void(^delayBlock)(void));
void custom_dispatch_after(float delayTime, void(^delayBlock)(void));
//异步线程延迟执行.
void custom_dispatch_global_after_log(NSString* logMsg, float delayTime, void(^delayBlock)(void));
void custom_dispatch_global_after(float delayTime, void(^delayBlock)(void));


//hook
void swizzleMethod(id classEx, SEL originalSelector, SEL swizzledSelector);


typedef void (^DisQueueTask)(BOOL cancel);
DisQueueTask MainDelay(NSTimeInterval time,void (^task)(void));
DisQueueTask GlobalDelay(NSTimeInterval time,void (^task)(void));

NS_ASSUME_NONNULL_BEGIN

@interface CustomFunction : NSObject

@end

NS_ASSUME_NONNULL_END
